import http from '@/utils/http'

export const getOderApi = () => {
  return http.get('/order/trade')
}

export const getOderAddressApi = () => {
  return http.get('/userAddress/getOrderAddress')
}
export const getBuyApi = (goodsId, blessing) => {
  return http.get(`/order/buy/${goodsId}`, {
    blessing
  })
}

export const postOrderApi = (data) => {
  return http.post('/order/submitOrder', data)
}

export const WechatPayApi = (orderNo) => {
  return http.get(`/webChat/createJsapi/${orderNo}`)
}

export const OrderStatusApi = (orderNo) => {
  return http.get(`/webChat/queryPayStatus/${orderNo}`)
}

export const getOrderListApi = (page, limit) => {
  return http.get(`/order/order/${page}/${limit}`)
}
